From c781cbbee8d9441d742ac4172cc068784742f4c5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 5 Jan 2006 17:39:17 +0000 Subject: [PATCH] Some more --- ChangeLog | 8 +++++--- ChangeLog.pre-2-10 | 8 +++++--- gtk/gtkaction.c | 21 +-------------------- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 679b4ad06d..ec8845d38f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,13 @@ 2006-01-05 Matthias Clasen - * gtk/gtkaction.c (connect_proxy): Use a weak reference rather - than the destroy signal to track proxies going away. + * gtk/gtkaction.c (connect_proxy, disconnect_proxy): + Use a weak reference rather than the destroy signal to track + proxies going away. * gtk/gtkbindings.c (binding_signal_new): Revert the last change. - * gtk/gtkaction.c (gtk_action_sync_property): Removed. + * gtk/gtkaction.c (gtk_action_sync_property): + (gtk_action_sync_stock_id): Removed. 2006-01-05 Rodrigo Moya diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 679b4ad06d..ec8845d38f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,11 +1,13 @@ 2006-01-05 Matthias Clasen - * gtk/gtkaction.c (connect_proxy): Use a weak reference rather - than the destroy signal to track proxies going away. + * gtk/gtkaction.c (connect_proxy, disconnect_proxy): + Use a weak reference rather than the destroy signal to track + proxies going away. * gtk/gtkbindings.c (binding_signal_new): Revert the last change. - * gtk/gtkaction.c (gtk_action_sync_property): Removed. + * gtk/gtkaction.c (gtk_action_sync_property): + (gtk_action_sync_stock_id): Removed. 2006-01-05 Rodrigo Moya diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index 581d38a78a..036a057341 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -618,23 +618,6 @@ _gtk_action_sync_menu_visible (GtkAction *action, gboolean _gtk_menu_is_empty (GtkWidget *menu); -static void -gtk_action_sync_stock_id (GtkAction *action, - GParamSpec *pspec, - GtkWidget *proxy) -{ - GtkWidget *image = NULL; - - if (GTK_IS_IMAGE_MENU_ITEM (proxy)) - { - image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (proxy)); - - if (GTK_IS_IMAGE (image)) - gtk_image_set_from_stock (GTK_IMAGE (image), - action->private_data->stock_id, GTK_ICON_SIZE_MENU); - } -} - static gboolean gtk_action_create_menu_proxy (GtkToolItem *tool_item, GtkAction *action) @@ -809,6 +792,7 @@ disconnect_proxy (GtkAction *action, { g_object_set_qdata (G_OBJECT (proxy), quark_gtk_action_proxy, NULL); + g_object_weak_unref (G_OBJECT (proxy), (GWeakNotify)remove_proxy, action); remove_proxy (action, proxy); /* disconnect the activate handler */ @@ -816,9 +800,6 @@ disconnect_proxy (GtkAction *action, G_CALLBACK (gtk_action_activate), action); - g_signal_handlers_disconnect_by_func (action, - G_CALLBACK (gtk_action_sync_stock_id), proxy); - /* toolbar button specific synchronisers ... */ g_signal_handlers_disconnect_by_func (proxy, G_CALLBACK (gtk_action_create_menu_proxy), -- 2.30.2